package com.lyncs.ods.resp;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Objects;

/**
 * @author alex
 * @date 2022/7/16 19:01
 * @description
 */
@Data
@Accessors(chain = true)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class CompanyGroupInfo {

    @ApiModelProperty("合作企业ID")
    private Long relationId;

    @ApiModelProperty("合作企业昵称")
    private String nickname;

    @ApiModelProperty("权限组ID")
    private Long groupId;

    @ApiModelProperty("权限组名称")
    private String groupName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CompanyGroupInfo that = (CompanyGroupInfo) o;
        return Objects.equals(relationId, that.relationId) && Objects.equals(nickname, that.nickname) && Objects.equals(groupId, that.groupId) && Objects.equals(groupName, that.groupName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(relationId, nickname, groupId, groupName);
    }
}
